package dto;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import exception.ValidationGroups;
import java.time.LocalDateTime;

/**
 *   新增课程参数模型
 * @author xiehaidong
 */
@Data
@ApiModel("新增课程基本信息参数类型")
public class AddCourseBaseDto {

        /**
         * 收费规则，对应数据字典
         */
        @NotEmpty(message = "课程收费规则不能为空",groups = {ValidationGroups.update.class})
        @ApiModelProperty(value = "收费规则")
        private String charge;

        /**
         * 现价
         */
        @ApiModelProperty(value = "现价")
        private float price;

        @ApiModelProperty(value = "原价")
        private Float originalPrice;

        /**
         * 微信
         */
        private String wechat;

        /**
         * 电话
         */
        private String phone;

        /**
         * 有效期天数
         */
        @ApiModelProperty(value = "有效期天数")
        private int validDays;

        /**
         * 大分类
         */
        @NotEmpty(message = "课程大分类不能为空",groups = {ValidationGroups.update.class})
        @NotEmpty(message = "课程大分类不能为空",groups = {ValidationGroups.insert.class})
        @ApiModelProperty(value = "课程大分类",required = true)
        private String mt;

        /**
         * 小分类
         */
        @NotEmpty(message = "课程小分类不能为空",groups = {ValidationGroups.insert.class})
        @NotEmpty(message = "课程小分类不能为空",groups = {ValidationGroups.update.class})
        @ApiModelProperty(value = "课程小分类",required = true)
        private String st;

        /**
         * 课程名称，不能为空，插入时校验
         */
        @NotEmpty(message = "课程名称不能为空",groups = {ValidationGroups.insert.class})
        @NotEmpty(message = "课程名称不能为空",groups = {ValidationGroups.update.class})
        @ApiModelProperty(value = "课程名称",required = true)
        private String name;

        /**
         * 课程图片
         */
        private String pic;

        /**
         * 教育模式（普通、录播、直播等），插入和更新时校验
         */
        @NotEmpty(message = "教育模式不能为空",groups = {ValidationGroups.insert.class})
        @ApiModelProperty(value = "教育模式",required = true)
        private String teachmode;

        /**
         * 适用人群，不能为空，插入时校验
         */
        @NotEmpty(message = "适用人群不能为空",groups = {ValidationGroups.insert.class})
        @ApiModelProperty(value = "适用人群",required = true)
        private String users;

        /**
         * 课程标签
         */
        @ApiModelProperty(value = "课程标签")
        private String tags;

        /**
         * 课程等级
         */
        @NotEmpty(message = "课程等级不能为空",groups = {ValidationGroups.insert.class})
        @ApiModelProperty(value = "课程等级",required = true)
        private String grade;

    }
